package com.woniu.his.dao;

import com.woniu.his.entity.DocterInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author TATO
 * @since 2019-11-25
 */
public interface DocterInfoMapper extends BaseMapper<DocterInfo> {

    List<DocterInfo> findDoctersBySectionId(@Valid int sectionId);

//    根据用户名查找对应的账户
    DocterInfo findDoctorByAccount(String account);

    @Select("select count(*) from docter_info where section_id=#{sectionId}")
    Integer getOperationDocterCount(int sectionId);
}
